package spring.cloud.eurekaclientfund.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import spring.cloud.eurekaclientfund.service.UserClient;
import spring.cloud.eurekaclientfund.service.UserFacade;


import javax.ws.rs.Path;
import java.sql.ResultSetMetaData;
import java.util.List;

@RestController
@RequestMapping("/feign")
public class FeignController {

////    @Autowired
////    private UserFacade userFacade;
//    @Autowired
//    private UserClient userClient;
//
//    @GetMapping("/user/{id}")
//    public UserInfo getUser(@PathVariable("id") Long id){
////        UserInfo user = userFacade.getUser(id);
//        UserInfo user = userClient.getUser(id);
//        return user;
//    }
//
//    @GetMapping("/user/{id}/{userName}/{note}")
//    public UserInfo updateUser(@PathVariable("id") Long id,@PathVariable("userName")String userName,@PathVariable("note")String note){
//        UserInfo userInfo = new UserInfo(id,userName,note);
////        return userFacade.putUser(userInfo);
//        return userClient.putUser(userInfo);
//    }
//
//    @PostMapping("/user/infoes2")
//    public ResponseEntity<List<UserInfo>> findUser2(@RequestParam("ids") Long []ids){
//        return userClient.findUser2(ids);
//    }
//
//    @DeleteMapping("/user/info")
//    public ResultMessage deleteUser(@RequestHeader("id") Long id){
//        return userClient.deleteUser(id);
//    }
//
//    @PostMapping(value = "/user/upload")
//    public ResultMessage uploadFile(MultipartFile file){
//        return userClient.uploadFile(file);
//    }
}
